using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using UWBGL_WinForms_Lib1;
using UWBGL_XNA_Lib13;

namespace XNA_SceneNode
{
  public class CPalm : UWB_SceneNode
  {
    public CPalm(Vector3 at)
    {

      mName = "Palm";

      UWB_PrimitiveList palmPrim = new UWB_PrimitiveList();

      UWB_PrimitiveCircle circ = new UWB_PrimitiveCircle();
      circ.setCenter(at);
      circ.setRadius(1.0f);
      circ.setFlatColor(new Color(0, 150, 0, 100));
      circ.setShadeMode(eShadeMode.smFlat);
      palmPrim.append(circ);

      UWB_PrimitiveRectangle rec = new UWB_PrimitiveRectangle();
      Vector3 c1 = new Vector3(at.X + 0.5f, at.Y - 0.5f, 0.0f);
      Vector3 c2 = new Vector3(at.X + 1.0f, at.Y + 0.5f, 0.0f);
      rec.setCorners(c1, c2);
      rec.setFlatColor(new Color(0, 0, 0));
      rec.setShadeMode(eShadeMode.smFlat);
      palmPrim.append(rec);

      setPrimitive(palmPrim);
      mXFormInfo.setPivot(new Vector3(at.X - 1.0f, at.Y, 0.0f));
    }

  }
}

